package com.nutiteq.storedmaps;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import com.nutiteq.log.Log;

public class StoredMapSample extends MIDlet {
  public static StoredMapSample instance;
  private MapCanvas canvas;

  public StoredMapSample() {
    instance = this;
  }

  protected void startApp() throws MIDletStateChangeException {
    Log.enableAll();
    if (canvas == null) {
      canvas = new MapCanvas();
    }

    Display.getDisplay(instance).setCurrent(canvas);
  }

  protected void destroyApp(final boolean arg0) throws MIDletStateChangeException {
    canvas = null;
    instance = null;
    notifyDestroyed();
  }

  protected void pauseApp() {

  }
}
